package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlOfcperbaseMapper;
import com.ruoyi.sl.domain.SlOfcperbase;
import com.ruoyi.sl.service.ISlOfcperbaseService;

/**
 * 行政绩效维护Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-03
 */
@Service
public class SlOfcperbaseServiceImpl implements ISlOfcperbaseService 
{
    @Autowired
    private SlOfcperbaseMapper slOfcperbaseMapper;

    /**
     * 查询行政绩效维护
     * 
     * @param ofcperbaseId 行政绩效维护主键
     * @return 行政绩效维护
     */
    @Override
    public SlOfcperbase selectSlOfcperbaseByOfcperbaseId(Long ofcperbaseId)
    {
        return slOfcperbaseMapper.selectSlOfcperbaseByOfcperbaseId(ofcperbaseId);
    }

    //按用户名查询绩效维护
    @Override
    public SlOfcperbase selectOnlySlOfcperbaseByUerName(String userName){
        return slOfcperbaseMapper.selectOnlySlOfcperbaseByUerName(userName);
    }

    //按用户名leftjoin查询绩效维护
    @Override
    public SlOfcperbase selectSlOfcperbaseByUerName(String userName){
        return slOfcperbaseMapper.selectSlOfcperbaseByUerName(userName);
    }

    //用户和绩效维护leftjoin列表
    @Override
    public List<SlOfcperbase> selectUserSlOfcperbaseList(SlOfcperbase slOfcperbase){
        return slOfcperbaseMapper.selectUserSlOfcperbaseList(slOfcperbase);
    }

    /**
     * 查询行政绩效维护列表
     * 
     * @param slOfcperbase 行政绩效维护
     * @return 行政绩效维护
     */
    @Override
    public List<SlOfcperbase> selectSlOfcperbaseList(SlOfcperbase slOfcperbase)
    {
        return slOfcperbaseMapper.selectSlOfcperbaseList(slOfcperbase);
    }

    /**
     * 新增行政绩效维护
     * 
     * @param slOfcperbase 行政绩效维护
     * @return 结果
     */
    @Override
    public int insertSlOfcperbase(SlOfcperbase slOfcperbase)
    {
        slOfcperbase.setCreateTime(DateUtils.getNowDate());
        return slOfcperbaseMapper.insertSlOfcperbase(slOfcperbase);
    }

    /**
     * 修改行政绩效维护
     * 
     * @param slOfcperbase 行政绩效维护
     * @return 结果
     */
    @Override
    public int updateSlOfcperbase(SlOfcperbase slOfcperbase)
    {
        slOfcperbase.setUpdateTime(DateUtils.getNowDate());
        return slOfcperbaseMapper.updateSlOfcperbase(slOfcperbase);
    }

    /**
     * 批量删除行政绩效维护
     * 
     * @param ofcperbaseIds 需要删除的行政绩效维护主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcperbaseByOfcperbaseIds(Long[] ofcperbaseIds)
    {
        return slOfcperbaseMapper.deleteSlOfcperbaseByOfcperbaseIds(ofcperbaseIds);
    }

    /**
     * 删除行政绩效维护信息
     * 
     * @param ofcperbaseId 行政绩效维护主键
     * @return 结果
     */
    @Override
    public int deleteSlOfcperbaseByOfcperbaseId(Long ofcperbaseId)
    {
        return slOfcperbaseMapper.deleteSlOfcperbaseByOfcperbaseId(ofcperbaseId);
    }
}
